home *** CD-ROM | disk | FTP | other *** search
/ Aminet 19 / Aminet 19 (1997)(GTI - Schatztruhe)[!][Jun 1997].iso / Aminet / dev / gui / tri20b2dev.lha / Triton / Developer / Include / clib / triton_protos.h
C/C++ Source or Header  |  1997-04-13  |  7KB  |  158 lines

  1. #ifndef CLIB_TRITON_PROTOS_H
  2. #define CLIB_TRITON_PROTOS_H
  3.  
  4. /*
  5. **    $VER: triton_protos.h 6.5 (11.7.96)
  6. **    Triton Release 2.0
  7. **
  8. **    triton.library prototypes
  9. **    triton.lib definitions
  10. **
  11. **    (C) Copyright 1993-1996 Stefan Zeiger
  12. **    All Rights Reserved
  13. */
  14.  
  15.  
  16. /********************************************************************************* Compiler specific stuff */
  17.  
  18. #ifdef _DCC
  19.  
  20. #ifndef EXEC_TYPES_H
  21. #include <exec/types.h>
  22. #endif
  23.  
  24. #ifndef LIBRARIES_TRITON_H
  25. #include <libraries/triton.h>
  26. #endif
  27.  
  28. #define REG(x) __ ## x
  29. #define ASM
  30. #define STACK  __stkargs
  31. #define REGS   __regargs
  32.  
  33. #else
  34.  
  35. #ifdef __GNUC__
  36.  
  37. #define REG(x)
  38. #define ASM
  39. #define STACK
  40. #define REGS
  41.  
  42. #else /* __SASC__ */
  43.  
  44. #define REG(x) register __ ## x
  45. #define ASM    __asm
  46. #define STACK  __stdargs
  47. #define REGS   __regargs
  48.  
  49. #endif /* __GNUC__ */
  50.  
  51. #endif /* _DCC */
  52.  
  53.  
  54. /************************************************************************************ User-level functions */
  55.  
  56. ASM extern struct TR_Project * TR_OpenProject(REG(a1) struct TR_App *app, REG(a0) struct TagItem *);
  57. ASM extern VOID                TR_CloseProject(REG(a0) struct TR_Project *);
  58.  
  59. ASM extern LONG                TR_FirstOccurance(REG(d0) UBYTE ch, REG(a0) STRPTR str);
  60. ASM extern LONG                TR_NumOccurances(REG(d0) UBYTE ch, REG(a0) STRPTR str);
  61. ASM extern STRPTR              TR_GetErrorString(REG(d0) UWORD num);
  62. ASM extern UWORD               TR_GetLastError(REG(a1) struct TR_App *app);
  63. ASM extern VOID                TR_CloseWindowSafely(REG(a0) struct Window *win);
  64.  
  65. ASM extern struct TR_Message * TR_GetMsg(REG(a1) struct TR_App *app);
  66. ASM extern VOID                TR_ReplyMsg(REG(a1) struct TR_Message *message);
  67. ASM extern ULONG               TR_Wait(REG(a1) struct TR_App *app, REG(d0) ULONG otherbits);
  68.  
  69. ASM extern ULONG               TR_SendMessage(REG(a0) struct TR_Project *project, REG(d0) ULONG objectid,
  70.                           REG(d1) ULONG messageid, REG(a1) void *messagedata);
  71. ASM extern VOID                TR_SetAttribute(REG(a0) struct TR_Project *, REG(d0) ULONG ID,
  72.                            REG(d1) ULONG attribute, REG(d2) ULONG value);
  73. ASM extern ULONG               TR_GetAttribute(REG(a0) struct TR_Project *, REG(d0) ULONG ID,
  74.                            REG(d1) ULONG attribute);
  75.  
  76. ASM extern VOID                TR_LockProject(REG(a0) struct TR_Project *project);
  77. ASM extern VOID                TR_UnlockProject(REG(a0) struct TR_Project *project);
  78.  
  79. ASM extern ULONG               TR_AutoRequest(REG(a1) struct TR_App *app,
  80.                           REG(a0) struct TR_Project *lockproject,
  81.                           REG(a2) struct TagItem *request_trwintags);
  82. ASM extern ULONG               TR_EasyRequest(REG(a1) struct TR_App *app, REG(a2) STRPTR bodymft,
  83.                           REG(a3) STRPTR gadfmt, REG(a0) struct TagItem *taglist);
  84.  
  85. ASM extern struct TR_App *     TR_CreateApp(REG(a1) struct TagItem *apptags);
  86. ASM extern VOID                TR_DeleteApp(REG(a1) struct TR_App *app);
  87.  
  88. ASM extern struct Screen *     TR_LockScreen(REG(a0) struct TR_Project *project);
  89. ASM extern VOID                TR_UnlockScreen(REG(a0) struct Screen *screen);
  90.  
  91. ASM extern struct Window *     TR_ObtainWindow(REG(a0) struct TR_Project *project);
  92. ASM extern VOID                TR_ReleaseWindow(REG(a0) struct Window *window);
  93.  
  94.  
  95. /*********************************************************************************** Class-level functions */
  96.  
  97. ASM extern BOOL                TR_AddClass(REG(a1) struct TR_App *app, REG(d0) ULONG tag,
  98.                        REG(d1) ULONG superTag, REG(a2) TR_Method defaultMethod,
  99.                        REG(d2) ULONG datasize, REG(a0) struct TagItem *tags);
  100.  
  101. ASM extern VOID                TR_DrawFrame(REG(a0) struct TR_Project *project,
  102.                         REG(a1) struct RastPort *rp, REG(d1) UWORD left,
  103.                         REG(d2) UWORD top, REG(d3) UWORD width, REG(d4) UWORD height,
  104.                         REG(d0) UWORD type, REG(d5) BOOL inverted);
  105. ASM extern ULONG               TR_FrameBorderHeight(REG(a0) struct TR_Project *project,
  106.                             REG(d0) UWORD type);
  107. ASM extern ULONG               TR_FrameBorderWidth(REG(a0) struct TR_Project *project,
  108.                            REG(d0) UWORD type);
  109.  
  110. ASM extern ULONG               TR_TextWidth(REG(a0) struct TR_Project *project,
  111.                         REG(a2) STRPTR text, REG(d0) ULONG flags);
  112. ASM extern ULONG               TR_TextHeight(REG(a0) struct TR_Project *project,
  113.                          REG(a2) STRPTR text, REG(d0) ULONG flags);
  114. ASM extern VOID                TR_PrintText(REG(a0) struct TR_Project *project,
  115.                         REG(a1) struct RastPort *rp, REG(a2) STRPTR text,
  116.                         REG(d1) ULONG x, REG(d2) ULONG y,
  117.                                             REG(d3) ULONG width, REG(d0) ULONG flags);
  118.  
  119. ASM extern ULONG               TR_GetPen(REG(a0) struct TR_Project *project,
  120.                      REG(d0) ULONG pentype, REG(d1) ULONG pendata);
  121. ASM extern ULONG               TR_DoMethod(REG(a0) struct TROD_Object *object,
  122.                        REG(d0) ULONG messageid, REG(a1) APTR data);
  123. ASM extern ULONG               TR_DoMethodClass(REG(a0) struct TROD_Object *object,
  124.                         REG(d0) ULONG messageid, REG(a1) APTR data,
  125.                         REG(a2) struct TR_Class *cl);
  126.  
  127. ASM extern VOID                TR_AreaFill(REG(a0) struct TR_Project *project, REG(a1) struct RastPort *rp,
  128.                        REG(d0) ULONG left, REG(d1) ULONG top, REG(d2) ULONG right,
  129.                        REG(d3) ULONG bottom, REG(d4) ULONG type, REG(a2) VOID *dummy);
  130.  
  131. ASM extern struct TR_Message * TR_CreateMsg(REG(a1) struct TR_App *app);
  132.  
  133.  
  134. /***************************************************************************************** Support library */
  135.  
  136. #ifndef TR_NOSUPPORT
  137.  
  138. STACK extern BOOL                 TR_OpenTriton(ULONG version, ULONG taglist,...);
  139. REGS  extern VOID                 TR_CloseTriton(VOID);
  140. STACK extern struct TR_App     *  TR_CreateAppTags(ULONG taglist,...);
  141. STACK extern struct TR_Project *  TR_OpenProjectTags(struct TR_App *app, ULONG taglist,...);
  142. STACK extern ULONG                TR_EasyRequestTags(struct TR_App *app, STRPTR bodymft, STRPTR gadfmt,
  143.                              ULONG taglist,...);
  144. STACK extern ULONG                TR_AutoRequestTags(struct TR_App *app, struct TR_Project *lockproject,
  145.                              ULONG taglist,...);
  146. STACK extern BOOL                 TR_AddClassTags(struct TR_App *app, ULONG tag, ULONG superTag,
  147.                           TR_Method defaultMethod, ULONG datasize,
  148.                           ULONG taglist,...);
  149. REGS  extern BOOL                 TRIM_trLogo_Init(VOID);
  150. REGS  extern VOID                 TRIM_trLogo_Free(VOID);
  151.  
  152. #endif /* TR_NOSUPPORT */
  153.  
  154.  
  155. /************************************************************************************************* The End */
  156.  
  157. #endif /* CLIB_TRITON_PROTOS_H */
  158.